#include <U8g2lib.h>
#include <Wire.h>
U8G2_SSD1306_128X80_NONAME_F_HW_I2C u8g2(U8G2_R1, /* reset=*/U8X8_PIN_NONE, /* clock=*/22, /* data=*/21); //oled占用21和22

void init_display()
{
    u8g2.begin();
    u8g2.enableUTF8Print();
    u8g2.setFont(u8g2_font_wqy15_t_chinese1);
    u8g2.setFontDirection(0);
    u8g2.clearBuffer();
}

void oled_print_single(unsigned short x, unsigned short y, String str) //128x80
{
    u8g2.clearBuffer();
    u8g2.setCursor(x, y);
    u8g2.print(str);
    u8g2.sendBuffer();
}

void oled_print_module(unsigned short x, unsigned short y, String str)
{
    u8g2.setCursor(x, y);
    u8g2.print(str);
}